class Coffee:
    def cost(self):
        pass


class SimpleCoffee(Coffee):
    def cost(self):
        return 10


class CoffeeDecorator(Coffee):
    def __init__(self, coffee):
        self.coffee = coffee

    def cost(self):
        return self.coffee.cost()


class MilkDecorator(CoffeeDecorator):
    def cost(self):
        return self.coffee.cost() + 2


class SugarDecorator(CoffeeDecorator):
    def cost(self):
        return self.coffee.cost() + 1


# 使用
simple_coffee = SimpleCoffee()
print(f"Simple Coffee Cost: {simple_coffee.cost()}")

milk_coffee = MilkDecorator(simple_coffee)
print(f"Milk Coffee Cost: {milk_coffee.cost()}")

sugar_milk_coffee = SugarDecorator(milk_coffee)
print(f"Sugar Milk Coffee Cost: {sugar_milk_coffee.cost()}")

'''
Simple Coffee Cost: 10
Milk Coffee Cost: 12
Sugar Milk Coffee Cost: 13
'''
